<?php
       $cpde = $_GET['code'];
    $url ="https://api.weixin.qq.com/sns/oauth2/access_token?appid=wx49e2ad1b356cad49&secret=246cd8cba01762ce78810538bf8525c7&code=".$cpde."&grant_type=authorization_code";

   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, $url);
   curl_setopt($ch, CURLOPT_TIMEOUT, 5);
   curl_setopt($ch, CURLOPT_USERAGENT, _USERAGENT_);
   curl_setopt($ch, CURLOPT_REFERER,_REFERER_);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   $r = curl_exec($ch);
   curl_close($ch);
   echo  $r;
?>